package com.ruoyi.purchaseReturn.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.product.domain.Product;
import com.ruoyi.purchase.domain.PurchaseOrder;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 采购退货主表
 *
 * @author WangChangShuo
 * @date 2022年06月15日 11:04
 */
public class PurchaseReturnOrder extends BaseEntity {

    private String beginTime;
    private String endTime;
    /**
     * 采购退货自增主键id
     */
    private Long purchaseReturnId;
    /**
     * 选择采购入库单主键
     */
    private Long procurementWarehousingId;
    /**
     * 采购订单编号
     */
    private String procurementWarehousingName;
    /**
     * 部门id（该单子属于哪个部门）
     */
    private Long deptId;
    private String deptName;
    /**
     * 订单日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date purchaseReturnDate;
    /**
     * 业务员id
     */
    private Long userId;
    /**
     * 业务员名称
     */
    private String userName;
    /**
     * 客户
     */
    private Long companyId;
    /**
     * 客户名称
     */
    private String companyName;
    /**
     * 订单审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date auditTime;
    /**
     * 订单金额
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal amount;
    /**
     * 订单金额(含税)
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal taxAmount;
    /**
     * 订单备注
     */
    private String remark;
    /**
     * 订单状态
     */
    private String purchaseReturnStatus;
    /**
     * 是否生成销售退货单
     */
    private String isReturn;
    /**
     * 与采购订单是一对一关系
     */
    private PurchaseOrder purchaseOrder;
    /**
     * 与从表 一对多关系
     */
    private List<PurchaseReturnModel> purchaseReturnModels;
    /**
     * 产品表
     */
    private List<Product> products;

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public List<Product> getProducts() {
        return products;
    }

    public void setProducts(List<Product> products) {
        this.products = products;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getIsReturn() {
        return isReturn;
    }

    public void setIsReturn(String isReturn) {
        this.isReturn = isReturn;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public PurchaseOrder getPurchaseOrder() {
        return purchaseOrder;
    }

    public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
        this.purchaseOrder = purchaseOrder;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getPurchaseReturnStatus() {
        return purchaseReturnStatus;
    }

    public void setPurchaseReturnStatus(String purchaseReturnStatus) {
        this.purchaseReturnStatus = purchaseReturnStatus;
    }

    public List<PurchaseReturnModel> getPurchaseReturnModels() {
        return purchaseReturnModels;
    }

    public void setPurchaseReturnModels(List<PurchaseReturnModel> purchaseReturnModels) {
        this.purchaseReturnModels = purchaseReturnModels;
    }

    public Long getPurchaseReturnId() {
        return purchaseReturnId;
    }

    public void setPurchaseReturnId(Long purchaseReturnId) {
        this.purchaseReturnId = purchaseReturnId;
    }

    public Long getProcurementWarehousingId() {
        return procurementWarehousingId;
    }

    public void setProcurementWarehousingId(Long procurementWarehousingId) {
        this.procurementWarehousingId = procurementWarehousingId;
    }

    public String getProcurementWarehousingName() {
        return procurementWarehousingName;
    }

    public void setProcurementWarehousingName(String procurementWarehousingName) {
        this.procurementWarehousingName = procurementWarehousingName;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Date getPurchaseReturnDate() {
        return purchaseReturnDate;
    }

    public void setPurchaseReturnDate(Date purchaseReturnDate) {
        this.purchaseReturnDate = purchaseReturnDate;
    }

    public Date getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(Date auditTime) {
        this.auditTime = auditTime;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getTaxAmount() {
        return taxAmount;
    }

    public void setTaxAmount(BigDecimal taxAmount) {
        this.taxAmount = taxAmount;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }
}
